1. Field of the Invention
The invention relates to an image processing apparatus and method for encoding and decoding image data.
2. Related Background Art
Hitherto, a DPCM (Differential Pulse Code Modulation) is widely known as a reversible encoding system of a multi-value image. According to a general encoding by DPCM, a prediction value (plane prediction) of an encode objective pixel is calculated by using encoded pixels existing around the encode objective pixel, namely, a left pixel (referred to as "a"), an upper pixel (likewise, "b"), and a left oblique pixel (likewise, "c") on the basis of, for example, an equation (a+b-c), and a difference between the prediction value and an encode objective pixel value is encoded.
Generally, since many portions of the image are formed by a monotonous luminance inclination, almost of the portion of the encode objective pixel is accurately predicted by a prediction of the foregoing encode objective pixel and is encoded.
However, in a high frequency portion in the pixel, namely, in an edge portion or a thin line portion, a large prediction error obviously occurs. In such a portion, a one-dimensional prediction in the direction of an edge or the extending direction is suitable instead of the plane prediction.
As mentioned above, the optimum prediction method differs depending on a nature in the pixel. Although the optimum predicting direction differs for each pixel, in the case where a user actually tries to perform the encoding, since additional information indicating which prediction method is used is added, encoding efficiency deteriorates.
As mentioned above, hitherto, there is a problem such that a prediction method of commonly efficiently encoding for both of a portion in which a pixel value has a gentle inclination and an edge portion or a thin line portion doesn't exist.
There is also a problem such that when performing a prediction encoding by selectively using a plurality of prediction methods, the additional information to indicate which prediction method is selected is necessary and the encoding efficiency is low.